using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Data;
using QL_Truong_Hoc.DTO;

namespace QL_Truong_Hoc.DAO
{
	public static class THocSinhDAO
	{
		#region Methods

		/// <summary>
		/// Saves a record to the tHocSinh table.
		/// </summary>
		public static bool Insert(Database objDb, DbTransaction objTrans, THocSinhDTO tHocSinh)
		{
bool blnResult = false;
try
{
			clsValidationUtility.ValidateArgument("tHocSinh", tHocSinh);

			object[] parameters = new object[]
			{
				Null.GetNull(tHocSinh.Hs_hodem, ""),
				Null.GetNull(tHocSinh.Hs_ten, ""),
				Null.GetNull(tHocSinh.Hs_tenthuonggoi, ""),
				Null.GetNull(tHocSinh.DV_ID, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_ngayvaodang, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_ngayvaodangCT, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_ngayvaodoan, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_gioitinh, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_dantoc, ""),
				Null.GetNull(tHocSinh.Hs_tongiao, ""),
				Null.GetNull(tHocSinh.Hs_ngaysinh, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_noisinh, ""),
				Null.GetNull(tHocSinh.Hs_quequan, ""),
				Null.GetNull(tHocSinh.Hs_hokhau, ""),
				Null.GetNull(tHocSinh.TDVH_ID, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_namtotnghiep, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_noitotnghiep, ""),
				Null.GetNull(tHocSinh.Hs_uutien, ""),
				Null.GetNull(tHocSinh.Hs_cmnd, ""),
				Null.GetNull(tHocSinh.Hs_cmnd_ngaycap, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_cmnd_noicap, ""),
				Null.GetNull(tHocSinh.Hs_hotencha, ""),
				Null.GetNull(tHocSinh.Hs_nghenghiepcha, ""),
				Null.GetNull(tHocSinh.Hs_hotenme, ""),
				Null.GetNull(tHocSinh.Hs_nghenghiepme, ""),
				Null.GetNull(tHocSinh.Hs_hotenvochong, ""),
				Null.GetNull(tHocSinh.Hs_nghenghiepvochong, ""),
				Null.GetNull(tHocSinh.Hs_diachilienlac, ""),
				Null.GetNull(tHocSinh.Hs_nghenghieptruockhihoc, ""),
				Null.GetNull(tHocSinh.Hs_nguyenvongsaukhihoc, ""),
				Null.GetNull(tHocSinh.Hs_dienthoainr, ""),
				Null.GetNull(tHocSinh.Hs_dienthoaidd, ""),
				Null.GetNull(tHocSinh.Hs_anh, ""),
				Null.GetNull(tHocSinh.CB_ID, DBNull.Value),
				Null.GetNull(tHocSinh.DD_ID, ""),
				Null.GetNull(tHocSinh.Hs_khaosattruockhihoc, false),
				Null.GetNull(tHocSinh.Hs_coviecsautotnghiep, false)
			};

int intResult;
if (objTrans == null)
{ intResult = objDb.ExecuteNonQuery("tHocSinhInsert", parameters); }
else if (objTrans.Connection == null)
{ intResult = objDb.ExecuteNonQuery("tHocSinhInsert", parameters); }
else
{ intResult = objDb.ExecuteNonQuery(objTrans, "tHocSinhInsert", parameters); }
if (intResult > 0) return true;
}
catch { return false; }
return blnResult;
		}

		/// <summary>
		/// Updates a record in the tHocSinh table.
		/// </summary>
		public static bool Update(Database objDb, DbTransaction objTrans, THocSinhDTO tHocSinh)
		{
bool blnResult = false;
try
{
			clsValidationUtility.ValidateArgument("tHocSinh", tHocSinh);

			object[] parameters = new object[]
			{
				Null.GetNull(tHocSinh.HS_ID, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_hodem, ""),
				Null.GetNull(tHocSinh.Hs_ten, ""),
				Null.GetNull(tHocSinh.Hs_tenthuonggoi, ""),
				Null.GetNull(tHocSinh.DV_ID, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_ngayvaodang, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_ngayvaodangCT, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_ngayvaodoan, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_gioitinh, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_dantoc, ""),
				Null.GetNull(tHocSinh.Hs_tongiao, ""),
				Null.GetNull(tHocSinh.Hs_ngaysinh, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_noisinh, ""),
				Null.GetNull(tHocSinh.Hs_quequan, ""),
				Null.GetNull(tHocSinh.Hs_hokhau, ""),
				Null.GetNull(tHocSinh.TDVH_ID, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_namtotnghiep, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_noitotnghiep, ""),
				Null.GetNull(tHocSinh.Hs_uutien, ""),
				Null.GetNull(tHocSinh.Hs_cmnd, ""),
				Null.GetNull(tHocSinh.Hs_cmnd_ngaycap, DBNull.Value),
				Null.GetNull(tHocSinh.Hs_cmnd_noicap, ""),
				Null.GetNull(tHocSinh.Hs_hotencha, ""),
				Null.GetNull(tHocSinh.Hs_nghenghiepcha, ""),
				Null.GetNull(tHocSinh.Hs_hotenme, ""),
				Null.GetNull(tHocSinh.Hs_nghenghiepme, ""),
				Null.GetNull(tHocSinh.Hs_hotenvochong, ""),
				Null.GetNull(tHocSinh.Hs_nghenghiepvochong, ""),
				Null.GetNull(tHocSinh.Hs_diachilienlac, ""),
				Null.GetNull(tHocSinh.Hs_nghenghieptruockhihoc, ""),
				Null.GetNull(tHocSinh.Hs_nguyenvongsaukhihoc, ""),
				Null.GetNull(tHocSinh.Hs_dienthoainr, ""),
				Null.GetNull(tHocSinh.Hs_dienthoaidd, ""),
				Null.GetNull(tHocSinh.Hs_anh, ""),
				Null.GetNull(tHocSinh.CB_ID, DBNull.Value),
				Null.GetNull(tHocSinh.DD_ID, ""),
				Null.GetNull(tHocSinh.Hs_khaosattruockhihoc, false),
				Null.GetNull(tHocSinh.Hs_coviecsautotnghiep, false)
			};

int intResult;
if (objTrans == null)
{ intResult = objDb.ExecuteNonQuery("tHocSinhUpdate", parameters); }
else if (objTrans.Connection == null)
{ intResult = objDb.ExecuteNonQuery("tHocSinhUpdate", parameters); }
else
{ intResult = objDb.ExecuteNonQuery(objTrans, "tHocSinhUpdate", parameters); }
if (intResult > 0) return true;
}
catch { return false; }
return blnResult;
		}

		/// <summary>
		/// Deletes a record from the tHocSinh table by its primary key.
		/// </summary>
		public static bool Delete(Database objDb, DbTransaction objTrans, int hS_ID)
		{
bool blnResult = false;
try
{
			object[] parameters = new object[]
			{
Null.GetNull(hS_ID, DBNull.Value)
			};

int intResult;
if (objTrans == null)
{ intResult = objDb.ExecuteNonQuery("tHocSinhDelete", parameters); }
else if (objTrans.Connection == null)
{ intResult = objDb.ExecuteNonQuery("tHocSinhDelete", parameters); }
else
{ intResult = objDb.ExecuteNonQuery(objTrans, "tHocSinhDelete", parameters); }
if (intResult > 0) return true;
}
catch { return false; }
return blnResult;
		}

		/// <summary>
		/// Deletes a record from the tHocSinh table by its primary key.
		/// </summary>
		public static bool Delete(Database objDb, DbTransaction objTrans, string strWhere)		{
bool blnResult = false;
try
{
			object[] parameters = new object[]
			{strWhere
			};

int intResult;
if (objTrans == null)
{ intResult = objDb.ExecuteNonQuery("tHocSinhDeleteWhere", parameters); }
else if (objTrans.Connection == null)
{ intResult = objDb.ExecuteNonQuery("tHocSinhDeleteWhere", parameters); }
else
{ intResult = objDb.ExecuteNonQuery(objTrans, "tHocSinhDeleteWhere", parameters); }
if (intResult > 0) return true;
}
catch { return false; }
return blnResult;
		}

		/// <summary>
		/// Selects a single record from the tHocSinh table.
		/// </summary>
		public static THocSinhDTO Select(Database objDb, int hS_ID)
		{
try{
			object[] parameters = new object[]
			{
Null.GetNull(hS_ID, DBNull.Value)
			};

			using (IDataReader dataReader = objDb.ExecuteReader("tHocSinhSelect", parameters))
			{
				if(dataReader.FieldCount > 0)
				{
					return MapDataReader(dataReader);
				}
				else
				{
					return null;
				}
			}
}catch { return null; }
		}

		/// <summary>
		/// Selects a single record from the tHocSinh table.
		/// </summary>
		public static DataTable Select(Database objDb, int hS_ID, bool blnReturnDatatable = true)
		{
try{
			object[] parameters = new object[]
			{
Null.GetNull(hS_ID, DBNull.Value)
			};

			using (IDataReader dataReader = objDb.ExecuteReader("tHocSinhSelect", parameters))
			{
				if(dataReader.FieldCount > 0)
				{
				DataTable dt = new DataTable();
				dt.Load(dataReader);
					return dt;
				}
				else
				{
					return null;
				}
			}
}catch { return null; }
		}

		/// <summary>
		/// Get next index from the tHocSinh table.
		/// </summary>
		public static int SelectNextIndex(Database objDb)		{
int intResult = -1;
try{
IDataReader dr = objDb.ExecuteReader("tHocSinhSelectNextIndex");
if (dr != null)
{
DataTable dt = Untils.ConvertDataReaderToDataTable(dr, true);
intResult = clsCommon.fncCnvNullToInt(dt.Rows[0][0]);
}
}catch { }
return intResult;
		}

		/// <summary>
		/// Selects all records from the tHocSinh table.
		/// </summary>
		public static List<THocSinhDTO> SelectAll(Database objDb)
		{
try{
			using (IDataReader dataReader = objDb.ExecuteReader("tHocSinhSelectAll"))
			{

				return MapDataReaderList(dataReader);
			}
}catch { return null; }
		}

		/// <summary>
		/// Selects all records from the tHocSinh table.
		/// </summary>
		public static List<THocSinhDTO> SelectWhere(Database objDb, string strWhere)
		{
try{
			object[] parameters = new object[]
			{strWhere
			};

			using (IDataReader dataReader = objDb.ExecuteReader("tHocSinhSelectWhere", parameters))
			{

				return MapDataReaderList(dataReader);
			}
}catch { return null; }
		}

		/// <summary>
		/// Selects all records from the tHocSinh table.
		/// </summary>
		public static DataTable SelectAll(Database objDb, bool blnReturnDatatable = true)
		{
try{
			using (IDataReader dataReader = objDb.ExecuteReader("tHocSinhSelectAll"))
			{

				if(dataReader.FieldCount > 0)
				{
				DataTable dt = new DataTable();
				dt.Load(dataReader);
					return dt;
				}
				else
				{
					return null;
				}
			}
}catch { return null; }
		}

		/// <summary>
		/// Selects all records from the tHocSinh table.
		/// </summary>
		public static DataTable SelectWhere(Database objDb, string strWhere, bool blnReturnDatatable = true)
		{
try{
			object[] parameters = new object[]
			{strWhere
			};

			using (IDataReader dataReader = objDb.ExecuteReader("tHocSinhSelectWhere", parameters))
			{

				if(dataReader.FieldCount > 0)
				{
				DataTable dt = new DataTable();
				dt.Load(dataReader);
					return dt;
				}
				else
				{
					return null;
				}
			}
}catch { return null; }
		}

		/// <summary>
		/// Creates a new instance of the THocSinhDTO class and populates it with data from the specified SqlDataReader.
		/// </summary>
		private static THocSinhDTO MapDataReader(IDataReader dataReader)
		{
			THocSinhDTO tHocSinhDTO = new THocSinhDTO();
DataTable dt = new DataTable();
dt.Load(dataReader);
if (dt.Rows.Count <= 0) return tHocSinhDTO;
			tHocSinhDTO.HS_ID = clsCommon.fncCnvNullToInt(dt.Rows[0]["HS_ID"]);
			tHocSinhDTO.Hs_hodem = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_hodem"]);
			tHocSinhDTO.Hs_ten = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_ten"]);
			tHocSinhDTO.Hs_tenthuonggoi = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_tenthuonggoi"]);
			tHocSinhDTO.DV_ID = clsCommon.fncCnvNullToInt(dt.Rows[0]["DV_ID"]);
			tHocSinhDTO.Hs_ngayvaodang = clsCommon.fncCnvNullToDatetime(dt.Rows[0]["hs_ngayvaodang"]);
			tHocSinhDTO.Hs_ngayvaodangCT = clsCommon.fncCnvNullToDatetime(dt.Rows[0]["hs_ngayvaodangCT"]);
			tHocSinhDTO.Hs_ngayvaodoan = clsCommon.fncCnvNullToDatetime(dt.Rows[0]["hs_ngayvaodoan"]);
			tHocSinhDTO.Hs_gioitinh = clsCommon.fncCnvNullToInt(dt.Rows[0]["hs_gioitinh"]);
			tHocSinhDTO.Hs_dantoc = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_dantoc"]);
			tHocSinhDTO.Hs_tongiao = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_tongiao"]);
			tHocSinhDTO.Hs_ngaysinh = clsCommon.fncCnvNullToDatetime(dt.Rows[0]["hs_ngaysinh"]);
			tHocSinhDTO.Hs_noisinh = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_noisinh"]);
			tHocSinhDTO.Hs_quequan = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_quequan"]);
			tHocSinhDTO.Hs_hokhau = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_hokhau"]);
			tHocSinhDTO.TDVH_ID = clsCommon.fncCnvNullToInt(dt.Rows[0]["TDVH_ID"]);
			tHocSinhDTO.Hs_namtotnghiep = clsCommon.fncCnvNullToInt(dt.Rows[0]["hs_namtotnghiep"]);
			tHocSinhDTO.Hs_noitotnghiep = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_noitotnghiep"]);
			tHocSinhDTO.Hs_uutien = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_uutien"]);
			tHocSinhDTO.Hs_cmnd = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_cmnd"]);
			tHocSinhDTO.Hs_cmnd_ngaycap = clsCommon.fncCnvNullToDatetime(dt.Rows[0]["hs_cmnd_ngaycap"]);
			tHocSinhDTO.Hs_cmnd_noicap = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_cmnd_noicap"]);
			tHocSinhDTO.Hs_hotencha = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_hotencha"]);
			tHocSinhDTO.Hs_nghenghiepcha = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_nghenghiepcha"]);
			tHocSinhDTO.Hs_hotenme = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_hotenme"]);
			tHocSinhDTO.Hs_nghenghiepme = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_nghenghiepme"]);
			tHocSinhDTO.Hs_hotenvochong = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_hotenvochong"]);
			tHocSinhDTO.Hs_nghenghiepvochong = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_nghenghiepvochong"]);
			tHocSinhDTO.Hs_diachilienlac = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_diachilienlac"]);
			tHocSinhDTO.Hs_nghenghieptruockhihoc = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_nghenghieptruockhihoc"]);
			tHocSinhDTO.Hs_nguyenvongsaukhihoc = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_nguyenvongsaukhihoc"]);
			tHocSinhDTO.Hs_dienthoainr = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_dienthoainr"]);
			tHocSinhDTO.Hs_dienthoaidd = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_dienthoaidd"]);
			tHocSinhDTO.Hs_anh = clsCommon.fncCnvNullToString(dt.Rows[0]["hs_anh"]);
			tHocSinhDTO.CB_ID = clsCommon.fncCnvNullToInt(dt.Rows[0]["CB_ID"]);
			tHocSinhDTO.DD_ID = clsCommon.fncCnvNullToString(dt.Rows[0]["DD_ID"]);
			tHocSinhDTO.Hs_khaosattruockhihoc = clsCommon.fncCnvNullToBool(dt.Rows[0]["hs_khaosattruockhihoc"]);
			tHocSinhDTO.Hs_coviecsautotnghiep = clsCommon.fncCnvNullToBool(dt.Rows[0]["hs_coviecsautotnghiep"]);

			return tHocSinhDTO;
		}
		/// <summary>
		/// Creates a new instance of the THocSinhDTO class and populates it with data from the specified SqlDataReader.
		/// </summary>
		private static List<THocSinhDTO> MapDataReaderList(IDataReader dataReader)
		{
				List<THocSinhDTO> lstResult = new List<THocSinhDTO>();
			THocSinhDTO tHocSinhDTO;
DataTable dt = new DataTable();
dt.Load(dataReader);
for (int i = 0; i <= dt.Rows.Count-1; i++)
{
			tHocSinhDTO = new THocSinhDTO();
			tHocSinhDTO.HS_ID = clsCommon.fncCnvNullToInt(dt.Rows[i]["HS_ID"]);
			tHocSinhDTO.Hs_hodem = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_hodem"]);
			tHocSinhDTO.Hs_ten = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_ten"]);
			tHocSinhDTO.Hs_tenthuonggoi = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_tenthuonggoi"]);
			tHocSinhDTO.DV_ID = clsCommon.fncCnvNullToInt(dt.Rows[i]["DV_ID"]);
			tHocSinhDTO.Hs_ngayvaodang = clsCommon.fncCnvNullToDatetime(dt.Rows[i]["hs_ngayvaodang"]);
			tHocSinhDTO.Hs_ngayvaodangCT = clsCommon.fncCnvNullToDatetime(dt.Rows[i]["hs_ngayvaodangCT"]);
			tHocSinhDTO.Hs_ngayvaodoan = clsCommon.fncCnvNullToDatetime(dt.Rows[i]["hs_ngayvaodoan"]);
			tHocSinhDTO.Hs_gioitinh = clsCommon.fncCnvNullToInt(dt.Rows[i]["hs_gioitinh"]);
			tHocSinhDTO.Hs_dantoc = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_dantoc"]);
			tHocSinhDTO.Hs_tongiao = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_tongiao"]);
			tHocSinhDTO.Hs_ngaysinh = clsCommon.fncCnvNullToDatetime(dt.Rows[i]["hs_ngaysinh"]);
			tHocSinhDTO.Hs_noisinh = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_noisinh"]);
			tHocSinhDTO.Hs_quequan = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_quequan"]);
			tHocSinhDTO.Hs_hokhau = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_hokhau"]);
			tHocSinhDTO.TDVH_ID = clsCommon.fncCnvNullToInt(dt.Rows[i]["TDVH_ID"]);
			tHocSinhDTO.Hs_namtotnghiep = clsCommon.fncCnvNullToInt(dt.Rows[i]["hs_namtotnghiep"]);
			tHocSinhDTO.Hs_noitotnghiep = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_noitotnghiep"]);
			tHocSinhDTO.Hs_uutien = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_uutien"]);
			tHocSinhDTO.Hs_cmnd = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_cmnd"]);
			tHocSinhDTO.Hs_cmnd_ngaycap = clsCommon.fncCnvNullToDatetime(dt.Rows[i]["hs_cmnd_ngaycap"]);
			tHocSinhDTO.Hs_cmnd_noicap = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_cmnd_noicap"]);
			tHocSinhDTO.Hs_hotencha = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_hotencha"]);
			tHocSinhDTO.Hs_nghenghiepcha = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_nghenghiepcha"]);
			tHocSinhDTO.Hs_hotenme = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_hotenme"]);
			tHocSinhDTO.Hs_nghenghiepme = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_nghenghiepme"]);
			tHocSinhDTO.Hs_hotenvochong = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_hotenvochong"]);
			tHocSinhDTO.Hs_nghenghiepvochong = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_nghenghiepvochong"]);
			tHocSinhDTO.Hs_diachilienlac = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_diachilienlac"]);
			tHocSinhDTO.Hs_nghenghieptruockhihoc = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_nghenghieptruockhihoc"]);
			tHocSinhDTO.Hs_nguyenvongsaukhihoc = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_nguyenvongsaukhihoc"]);
			tHocSinhDTO.Hs_dienthoainr = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_dienthoainr"]);
			tHocSinhDTO.Hs_dienthoaidd = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_dienthoaidd"]);
			tHocSinhDTO.Hs_anh = clsCommon.fncCnvNullToString(dt.Rows[i]["hs_anh"]);
			tHocSinhDTO.CB_ID = clsCommon.fncCnvNullToInt(dt.Rows[i]["CB_ID"]);
			tHocSinhDTO.DD_ID = clsCommon.fncCnvNullToString(dt.Rows[i]["DD_ID"]);
			tHocSinhDTO.Hs_khaosattruockhihoc = clsCommon.fncCnvNullToBool(dt.Rows[i]["hs_khaosattruockhihoc"]);
			tHocSinhDTO.Hs_coviecsautotnghiep = clsCommon.fncCnvNullToBool(dt.Rows[i]["hs_coviecsautotnghiep"]);
lstResult.Add(tHocSinhDTO);
}

			return lstResult;
		}

		#endregion
	}
}
